home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 3 / BBS in a box - Trilogy III.iso / Files / Tele / C / Calypso Folder / Connection Files / FirstClass User modem CCL < prev    next >
Encoding:
Text File  |  1992-08-21  |  11.2 KB  |  452 lines  |  [TEXT/GEOL]

  1. ! This FirstClass user CCL is for connecting to the FirstClass host using the 
  2. ! FirstClass front end and a hayes compatible modem.  
  3. ! Modified from the Serial Tool Modem script for 
  4. ! AppleLink, so the error codes may still refer to the ALink host...
  5. !------------------------------------------------------------------------------
  6. !---                        This is the disconnection code.                 ---
  7. !------------------------------------------------------------------------------
  8. !
  9. *-LABEL 0
  10. *SetVar 1 0
  11. *MatchStr 1 4 NO CARRIER
  12. !
  13. *-LABEL 1
  14. *MatchStr 2 4 OK
  15. !
  16. *-LABEL 2
  17. *ChrDelay 10
  18. *Xmit +++
  19. *Pause 80
  20. *Xmit ATZ\13
  21. *Wait 300
  22. *IncVar 1
  23. *IfVar 1 5 3
  24. *Jump 2
  25. !
  26. *-LABEL 3
  27. *Alert 3 Your modem is not hanging up properly. Please turn it off and then back on again before reconnecting to AppleLink.
  28. !
  29. *-LABEL 4
  30. *CTBClose
  31. *Exit 0
  32. !
  33. !------------------------------------------------------------------------------
  34. !---  This is the connection code. LABEL 0 configures AppleLink for         ---
  35. !---  communication. LABELs 1-25 are modem configuration and dialing.       ---
  36. !---  LABELs 30 through 38 are host connection. Do not change LABELs 30-38. ---
  37. !------------------------------------------------------------------------------
  38. !
  39. -LABEL 0
  40. CanBtn 91
  41. IfEqJMP "" "~FONE" 53
  42. NoCTB 54
  43. DsplyPic 1
  44. DsplyMsg Establishing communication with the serial device.
  45. !
  46. !------The following is where the CCL sets up and calls the CTB Tool---------
  47. !
  48. !  -Call the tool selected in the setup connection dialog
  49. CTBTool 56 55 0 ~TOOL  
  50. !
  51. !  -Set the Tool parameters. If param value contains a space, set value off    
  52. !   by enclosing it in quotes.
  53. CTBParam 56 Baud ~BAUD Parity None DataBits 8 StopBits 1 Handshake None Port "Modem Port" HoldConnection False RemindDisconnect False
  54. !
  55. !  -Open the selected tool and set a condition if the CTB connection fails
  56. CTBOpen 1
  57. Alert 90 An attempt to open the CTB connection failed. The parameters may be set wrong. Click OK to set the parameters manually, or Cancel to cancel.
  58. CTBChoose
  59. CTBOpen 1
  60. Jump 57
  61. !
  62. -LABEL 1
  63. DsplyMsg Checking modem type…
  64. ChrDelay 2
  65. MatchStr 1 20 Apple Data Modem
  66. MatchStr 2 2 ERROR
  67. Xmit ATI9\13
  68. Wait 30
  69. !
  70. -LABEL 2
  71. DsplyMsg Configuring the modem…
  72. MatchStr 1 44 NO CARRIER
  73. MatchStr 2 5 OK
  74. MatchStr 3 3 ERROR
  75. Flush
  76. ChrDelay 5
  77. Xmit ~MSTR\13
  78. Wait 120
  79. CTBDown 58
  80. !
  81. -LABEL 3
  82. DsplyMsg Not accepting the Modem String (from Set Up)
  83. JSR 100
  84. MatchStr 2 5 OK
  85. MatchStr 3 4 ERROR
  86. Xmit ATE0X1V1\13
  87. DsplyMsg Trying ATE0X1V1…
  88. Wait 120
  89. !
  90. -LABEL 4
  91. DsplyMsg Still no luck.  Trying factory defaults.
  92. Pause 60
  93. MatchStr 2 5 OK
  94. MatchStr 3 41 ERROR
  95. Xmit AT&F\13
  96. Wait 120
  97. Jump 40
  98. !
  99. -LABEL 5
  100. DsplyPic 1
  101. DsplyMsg Dialing ~FONE…
  102. MatchStr 2 30 CONNECT
  103. MatchStr 3 10 BUSY
  104. MatchStr 4 43 NO DIALTONE
  105. MatchStr 5 6 RINGING
  106. Pause 30
  107. CanBtn 90
  108. Xmit ATD~TONE~FONE\13
  109. Wait 600
  110. CTBDown 58
  111. DsplyMsg Waiting for connection…
  112. Wait 2000
  113. IncVar 1
  114. IfVar 1 3 61
  115. DsplyMsg No answer.  Trying again…
  116. JSR 100
  117. Pause 30
  118. Flush
  119. Jump 5
  120. !
  121. -LABEL 6
  122. DsplyMsg >RING<…
  123. MatchStr 5 7 RINGING
  124. Wait 120
  125. DsplyMsg Waiting for answer…
  126. Wait 2000
  127. IncVar 1
  128. IfVar 1 3 61
  129. DsplyMsg No answer.  Trying again…
  130. JSR 100
  131. Pause 30
  132. Flush
  133. Jump 5
  134. !
  135. -LABEL 7
  136. DsplyMsg >RING<  >RING<…
  137. MatchStr 5 8 RINGING
  138. Wait 120
  139. DsplyMsg Still waiting for answer…
  140. Wait 600
  141. IncVar 1
  142. IfVar 1 3 61
  143. DsplyMsg No answer.  Trying again…
  144. JSR 100
  145. Pause 30
  146. Flush
  147. Jump 5
  148. !
  149. -LABEL 8
  150. DsplyMsg >RING<  >RING<  >RING<…
  151. MatchStr 5 9 RINGING
  152. Wait 120
  153. DsplyMsg Getting tired of waiting…
  154. Wait 400
  155. IncVar 1
  156. IfVar 1 3 61
  157. DsplyMsg No answer. Trying again…
  158. JSR 100
  159. Pause 30
  160. Flush
  161. Jump 5
  162. !
  163. -LABEL 9
  164. DsplyMsg >RING<  >RING<  >RING<  >RING<…
  165. Wait 120
  166. DsplyMsg Still waiting…
  167. Wait 1400
  168. IncVar 1
  169. IfVar 1 3 61
  170. DsplyMsg No answer. Trying again…
  171. JSR 100
  172. Pause 30
  173. Flush
  174. Jump 5
  175. !
  176. -LABEL 10
  177. IncVar 2
  178. IfVar 2 4 60
  179. IfEqJmp "~FON2" "-------------" 15
  180. IFEqJmp "~FON2" "" 15
  181. DsplyMsg The network modem is busy; trying alternate number…
  182. JSR 100
  183. Pause 30
  184. Flush
  185. !
  186. -LABEL 11
  187. DsplyMsg Dialing ~FON2…
  188. MatchStr 2 30 CONNECT
  189. MatchStr 3 12 BUSY
  190. MatchStr 4 43 NO DIALTONE
  191. MatchStr 5 6 RINGING
  192. Pause 30
  193. CanBtn 90
  194. SerReset ~BPS2 0 8 1
  195. Xmit ATD~TONE~FON2\13
  196. Wait 600
  197. CTBDown 58
  198. DsplyMsg Waiting for connection…
  199. Wait 2000
  200. IncVar 1
  201. IfVar 1 3 61
  202. DsplyMsg No answer.  Trying again…
  203. JSR 100
  204. Pause 30
  205. Flush
  206. Jump 11
  207. !
  208. -LABEL 12
  209. IncVar 2
  210. IfVar 2 4 64
  211. DsplyMsg The alternate phone number is busy; trying first number…
  212. JSR 100
  213. Pause 30
  214. Flush
  215. Jump 5
  216. !
  217. -LABEL 15
  218. DsplyMsg The network phone number is busy; trying again…
  219. JSR 100
  220. Pause 30
  221. Flush
  222. Jump 5
  223. !
  224. -LABEL 20
  225. DsplyMsg Configuring Apple Data Modem…
  226. MatchStr 1 44 NO CARRIER
  227. MatchStr 2 5 OK
  228. MatchStr 3 23 ERROR
  229. Xmit ATE0V1X4\92N0\13
  230. Wait 120
  231. !
  232. -LABEL 23
  233. DsplyMsg Apple Data Modem not accepting string: ATE0V1X4\N0
  234. JSR 100
  235. MatchStr 2 5 OK
  236. MatchStr 3 24 ERROR
  237. Xmit ATE0V1X4\92N0\13
  238. DsplyMsg Trying again…
  239. Wait 120
  240. !
  241. -LABEL 24
  242. DsplyMsg Still no luck.  Trying factory defaults.
  243. Pause 60
  244. MatchStr 2 25 OK
  245. MatchStr 3 45 ERROR
  246. Xmit AT&F\13
  247. Wait 120
  248. Jump 40
  249. !
  250. -LABEL 25
  251. MatchStr 2 5 OK
  252. MatchStr 3 46 ERROR
  253. Xmit ATE0V1X4\92N0\13
  254. Wait 120
  255. Jump 41
  256. !
  257. -LABEL 26
  258. IncTries
  259. IfTries 2 73
  260. IfEqJmp "~FON2" "-------------" 73
  261. IFEqJmp "~FON2" "" 73
  262. DsplyMsg The network phone number is down.  Trying alternate…
  263. JSR 100
  264. Pause 30
  265. Flush
  266. Jump 11
  267. -LABEL 30
  268. !
  269. Matchstr 1 31 1200
  270. MatchStr 2 31 2400
  271. MatchStr 3 31 4800
  272. MatchStr 4 31 9600
  273. MatchStr 5 31 19200
  274. Wait 50
  275. -LABEL 31
  276. DsplyMsg Waiting For Connection
  277. ! wait for "press return twice to connect"...
  278. MatchStr 1 32 twice to Connect
  279. wait  300
  280. -LABEL 32
  281. Flush
  282. DsplyMsg Connection established. 
  283. DEBUG_OFF
  284. EXIT 0
  285.  
  286. !
  287. !------------------------------------------------------------------------------
  288. !---         LABELS 40 to 49 are modem errors. Change these freely.         ---
  289. !---         If you are using this CCL file as a starter CCL, this is       ---
  290. !---         where you should put alerts for your phone system’s errors.    ---
  291. !------------------------------------------------------------------------------
  292. -LABEL 40
  293. Alert 91 The modem isn’t responding to AT commands. Turn your modem off, check the cables, the modem set up, the bps rate and port selected in the AppleLink Set Up box, then turn the modem back on again.\13\13Click OK to try again.
  294. Jump 93
  295. !
  296. -LABEL 41
  297. Alert 91 The modem is responding with ERROR to the following AT strings: ~MSTR, ATE0X1V1, and AT&F.\13Please read your modem manual to determine the problem.\13\13Click Cancel or OK to exit.
  298. Jump 91
  299. !
  300. -LABEL 42
  301. Alert 91 Your modem is responding to AT&F, but not to either modem configuration string ~MSTR or ATE0X1V1. Please refer to your modem manual or call your modem manufacturer.\13\13Click Cancel or OK to exit.
  302. Jump 91
  303. !
  304. -LABEL 43
  305. JSR 96
  306. Alert 91 There is no dial tone. Be sure that your modem is connected to a working telephone line.\13If the problem continues, call your telecom representative.\13\13Click OK to try again.
  307. Jump 93
  308. !
  309. -LABEL 44
  310. JSR 96
  311. Alert 91 The phone line has unexpectedly gone dead. Please try turning your modem off then back on before trying again. Either your modem or the network modem may be having a problem.\13\13Click OK to try again.
  312. Jump 93
  313. !
  314. !------------------------------------------------------------------------------
  315. !---                   LABELS 50 to 59 are set up errors.                   ---
  316. !------------------------------------------------------------------------------
  317. !
  318. -LABEL 51
  319. Alert 90 There is a space or spaces in the User field (in the Connect dialog under the Network menu.  The space(s) might be before or after the AppleLink ID).\13\13Please tab to that field and retype your AppleLink ID without spaces.
  320. Jump 90
  321. !
  322. -LABEL 52
  323. Alert 90 There is a hyphen or hyphens in the AppleLink ID field (in the Connect dialog under the Network menu).\13\13Please tab to that field and retype your AppleLink ID without the hyphen(s).
  324. Jump 90
  325. !
  326. -LABEL 53
  327. Alert 90 You must enter a network phone number in the “Network Phone #” field in Set Up Connection under the Network menu.\13\13Use the file “Access Numbers” on your AppleLink disk to find the number closest to you.
  328. Jump 90
  329. !
  330. -LABEL 54
  331. Alert 90 The Communications Toolbox ia not installed. You must have it installed properly to use this connection file.\13\13Click OK or Cancel to cancel.
  332. Jump 90
  333. !
  334. -LABEL 55
  335. Alert 90 An attempt to open the CTB connecetion failed during the opening of the ~TOOL. You must have CTB installed properly to use this connection file. Click OK or Cancel to cancel.
  336. Jump 90
  337. !
  338. -LABEL 56
  339. Alert 90 An attempt to open the ~TOOL failed. Make sure the CTB and ~TOOL is properly installed.\13\13Click OK or Cancel to cancel.
  340. Jump 90
  341. !
  342. -LABEL 57
  343. Alert 90 After repeated attempts, the CTB connection failed while accessing\13 the ~TOOL.\13\13Click OK or Cancel to cancel.
  344. Jump 90
  345. !
  346. -LABEL 58
  347. Alert 90 The ~TOOL connection has suddenly dropped.\13\13Click OK to try again.
  348. Jump 100
  349. !
  350. !
  351. !------------------------------------------------------------------------------
  352. !---     LABELS 60 to 69 are network node errors. You may change these.     ---
  353. !------------------------------------------------------------------------------
  354. !
  355. -LABEL 60
  356. JSR 96
  357. Alert 91 The network number is repeatedly busy. Please try again later. \13\13Click OK to try again now.
  358. Jump 93
  359. !
  360. -LABEL 61
  361. JSR 96
  362. Alert 91 The network is not answering. Check to be sure the phone number is correct.\13If the problem continues, call the Apple Online Services HelpLine at (408) 974-3309.\13\13Click OK to try again.
  363. Jump 93
  364. !
  365. -LABEL 62
  366. JSR 95
  367. Alert 91 The ~APPL host is not responding.\13If the problem continues, call the Apple Online Services HelpLine at (408) 974-3309.\13\13Click OK to try again.
  368. Jump 93
  369. !
  370. -LABEL 63
  371. JSR 95
  372. Alert 91 Speed out of synch error (your H’s got lost). Please report this problem to the Apple Online Services HelpLine at (408) 974-3309.\13\13Click OK to try again.
  373. Jump 93
  374. !
  375. -LABEL 64
  376. JSR 96
  377. Alert 91 Both the network number and alternate network number are repeatedly busy. Please try again later. \13\13Click OK to try again now.
  378. Jump 93
  379. !
  380. !------------------------------------------------------------------------------
  381. !---        LABELS 70 to 79 are Mark III errors. Do not change these.       ---
  382. !------------------------------------------------------------------------------
  383. !
  384.  
  385. !------------------------------------------------------------------------------
  386. !---      Disconnection logic. It may look complicated; but, well, OK, I    ---
  387. !---      guess it is just a bit complex. Simplicity was never my forte.    ---
  388. !---  --- Don’t change this code except for the DsplyMsg in LABEL 96. ---   ---
  389. !------------------------------------------------------------------------------
  390. !
  391. -LABEL 90
  392. JSR 95
  393. !
  394. -LABEL 91
  395. Exit -1
  396. !
  397. -LABEL 92
  398. JSR 96
  399. Exit -1
  400. !
  401. -LABEL 93
  402. DsplyPic 0
  403. SetVar 1 0
  404. SetVar 2 0
  405. SetVar 3 0
  406. SetVar 4 0
  407. SetVar 5 0
  408. SetTries 0
  409. Flush
  410. Jump 1
  411. !
  412. -LABEL 94
  413. Xmit STOP\13
  414. Jump 90
  415. !
  416. -LABEL 95
  417. DsplyMsg Disconnecting...
  418. Jump 100
  419. !
  420. -LABEL 96
  421. DsplyMsg Resetting the modem...
  422. !
  423. !------------------------------------------------------------------------------
  424. !---   That which actually does the hanging up.  You may change this code.  ---
  425. !------------------------------------------------------------------------------
  426. !
  427. -LABEL 100
  428. MatchStr 1 102 OK
  429. MatchStr 2 102 NO CARRIER
  430. SetVar 8 0
  431. ChrDelay 10
  432. !
  433. -LABEL 101
  434. Xmit +++
  435. Pause 80
  436. Xmit ATZ\13
  437. Wait 100
  438. IncVar 8
  439. IfVar 8 2 103
  440. CTBClose
  441. Jump 101
  442. !
  443. -LABEL 102
  444. MatchStr 1 44 NO CARRIER
  445. CTBClose
  446. Return
  447. !
  448. -LABEL 103
  449. Alert 91 Your modem is not hanging up properly. Please turn it off and then back on again before reconnecting to AppleLink.
  450. Exit -1
  451. ###
  452.